package hn.cch.version.lts17;

import java.util.Optional;

public class OptionalDemo {

    public static void main(String[] args) {

        String string = null;
        if (args.length > 0) {
            string = args[0];
        }
        Optional<String> optional = Optional.ofNullable(string);
        // String result = optional.orElseThrow(() -> new IllegalArgumentException("value is null"));

        if (optional.isPresent()) {
            String result = optional.get();
        }




    }
}
